﻿namespace AC.ExtendedRenderer.Toolkit.Charting
{
    using System;
    using System.Drawing;

    public class CLabelProperty
    {
        private bool bVisible;
        private System.Drawing.Color color;
        private System.Drawing.Font font;
        private CLabelProperty m_clone;

        public CLabelProperty()
        {
            this.Font = new System.Drawing.Font("Tahoma", 8f, FontStyle.Bold);
            this.Color = System.Drawing.Color.FromArgb(0xff, 0xff, 0xff, 0xff);
            this.Visible = true;
        }

        public void RestoreObject()
        {
            if (this.m_clone != null)
            {
                this.Visible = this.m_clone.Visible;
                this.Font = this.m_clone.Font;
                this.Color = this.m_clone.Color;
            }
        }

        public void SaveObject()
        {
            this.m_clone = new CLabelProperty();
            this.m_clone.Visible = this.Visible;
            this.m_clone.Font = this.Font;
            this.m_clone.Color = this.Color;
        }

        public System.Drawing.Color Color
        {
            get
            {
                return this.color;
            }
            set
            {
                this.color = value;
            }
        }

        public System.Drawing.Font Font
        {
            get
            {
                return this.font;
            }
            set
            {
                this.font = value;
            }
        }

        public bool Visible
        {
            get
            {
                return this.bVisible;
            }
            set
            {
                this.bVisible = value;
            }
        }
    }
}

